

<template>
  <div>
    <div class="title">周末去哪</div>
    <ul>
      <li class="iteam border-bottom" v-for="vaul of weekendLsit" :key="vaul.id">
        <div class="iteam-img-wrapper">
          <img class="iteam-img" :src="vaul.imgUrl">
        </div>
        <div class="iteam-info">
          <p class="iteam-title">{{ vaul.title }}</p>
          <p class="iteam-desc">{{ vaul.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "Recommend",
  props: {
    list: Array
  },
  data() {
    return {
      weekendLsit: this.list
    }
  },
  watch: {
    list(n) {
      this.weekendLsit = n
    }
  }
}
</script>

<style lang="stylus" scoped>
@import "~styles/minxins.styl"
  .title
    text-indent: .2rem
    line-height: .7rem
    background: #eee
    font-weight: 900
    text-align: center 
  .iteam
    overflow: hidden
    margin: .1rem 
  .iteam-img-wrapper
    height: 0
    overflow: hidden
    padding-bottom: 37.5%  
    .iteam-img
      width: 100% 
  
  .iteam-info
    padding-left: .15rem
    min-width: 0 
    .iteam-title
      line-height: .54rem
      ellipsis()
      font-size: .32rem
    .iteam-desc
      line-height: .4rem
      ellipsis()
      color: #ccc
</style>
